Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sdcore_config interface tests #171

Conversation

Copy link
Contributor

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Quick flyby review of the interface tests.

t.assert_schema_valid()
assert state_out.unit_status.name == 'active'
t.run("sdcore-config-relation-created")
t.assert_relation_data_empty()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks more like a test_no_data_on_created



t.run('sdcore-config-relation-joined')
t.assert_relation_data_empty()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surprised this would pass, since you are putting some data in the input state. Is the charm supposed to delete the data? If so, rename the test to something more explicit or add some comments to explain what's going on.

@@ -5,33 +5,17 @@
from scenario import Relation, State


def test_state_active_on_joined():
def test_no_data_on_joined():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should be a 'happy-path' test in here too, one where you t.assert_schema_valid().

@patriciareinoso
Copy link
Contributor Author

The current solution for tests does not fit our need. We will explore how to do these tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants